package com.itbaima.pojo.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "departments")
public class Department {

    @Id
    @Column(name = "department_id")
    private Integer department_id; // 部门ID

    @Column(name = "department_name", nullable = false, length = 100)
    private String department_name; // 部门名称

    @Column(name = "parent_id")
    private Integer parent_id; // 上级部门ID，可为空

    @Column(name = "level", nullable = false)
    private Integer level; // 部门等级：1=一级，2=二级，3=三级

    // 新增字段：薪酬标准编号
    private Integer salaryId;  // 用于存储计算后的薪酬标准编号

    // getter 和 setter 方法（Lombok 会自动生成，除非手动添加）
    public Integer getDepartmentId() {
        return department_id;
    }

    public void setDepartmentId(Integer department_id) {
        this.department_id = department_id;
    }

    public Integer getSalaryId() {
        return salaryId;
    }

    public void setSalaryId(Integer salaryId) {
        this.salaryId = salaryId;
    }
}
